/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #fff;
    overflow: hidden;
}

/* 设置按钮样式 */
.settings-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    z-index: 10;
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* 设置面板样式 */
.settings-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    padding: 1rem;
    transform: translateY(-100%);
    transition: transform 0.3s ease-out;
    display: flex;
    justify-content: center;
    backdrop-filter: blur(10px);
    z-index: 5;
}

.settings-panel.show {
    transform: translateY(0);
}

.settings-form {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.settings-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-group label {
    font-weight: 500;
}

.settings-group select {
    padding: 0.5rem;
    border-radius: 5px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
}

/* 游戏主容器 */
.game-container {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 500px;
    max-width: 90%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.game-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.game-container h1 {
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 单词显示区域 */
#word {
    font-size: 2.5rem;
    margin: 1.5rem 0;
    font-weight: 600;
    min-height: 3.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

/* 输入框样式 */
input {
    width: 100%;
    padding: 1rem;
    margin: 1.5rem 0;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    text-align: center;
}

input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.5);
    transform: scale(1.02);
}

/* 游戏信息区域 */
.game-info {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
}

.time-container, .score-container {
    font-size: 1.1rem;
    font-weight: 500;
}

.time-container span, .score-container span {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 0.3rem;
    color: #ffcc00;
}

/* 游戏结束界面 */
#end-game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 20;
    backdrop-filter: blur(5px);
}

.end-game-content {
    background: rgba(255, 255, 255, 0.9);
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    max-width: 80%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
}

#end-game-container.show .end-game-content {
    transform: scale(1);
    opacity: 1;
}

#end-game-container h2 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 2rem;
}

#end-game-container p {
    color: #555;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

#end-game-container p span {
    font-weight: 600;
    color: #667eea;
}

#restart-btn {
    padding: 0.8rem 1.8rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

#restart-btn:hover {
    background: #5a6fd1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 响应式设计 */
@media (max-width: 600px) {
    .game-container {
        padding: 1.5rem;
    }
    
    .game-container h1 {
        font-size: 1.8rem;
    }
    
    #word {
        font-size: 2rem;
    }
    
    input {
        padding: 0.8rem;
    }
    
    .settings-form {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .settings-group {
        width: 100%;
        justify-content: space-between;
    }
}